require("../../common/vendor.js"), (global.webpackJsonp = global.webpackJsonp || []).push([ [ "pagesA/pages/userA/order" ], {
    "518d": function(e, t, r) {
        (function(o) {
            Object.defineProperty(t, "__esModule", {
                value: !0
            }), t.default = void 0;
            var e, a = (e = r("a34a")) && e.__esModule ? e : {
                default: e
            };
            function u(e, n, t, r, o, a, s) {
                try {
                    var i = e[a](s), u = i.value;
                } catch (e) {
                    return t(e), 0;
                }
                i.done ? n(u) : Promise.resolve(u).then(r, o);
            }
            var s = getApp(), n = (r("10cd"), {
                data: function() {
                    return {
                        module_name: s.globalData.module_name,
                        showAlert_login: !1,
                        userinfo: o.getStorageSync("userinfo"),
                        setting: o.getStorageSync("setting"),
                        wxCode: "",
                        systemtype: "",
                        swiperCurrentIndex: 0,
                        tabs: [ "全部", "已付款", "已完成", "已取消" ],
                        mainHeight: 0,
                        orders: [ [], [], [], [] ],
                        pages: [ 1, 1, 1, 1 ],
                        loadingTypes: [ 3, 3, 3, 3 ],
                        pageLoading: !0,
                        type: ""
                    };
                },
                onReady: function() {
                    var t = this;
                    setTimeout(function() {
                        o.createSelectorQuery().select("#gBody").fields({
                            size: !0
                        }, function(n) {
                            o.createSelectorQuery().select("#nav").fields({
                                size: !0
                            }, function(e) {
                                t.mainHeight = n.height - e.height, t.pageLoading = !1;
                            }).exec();
                        }).exec();
                    }, 1500);
                },
                onShow: function() {
                    o.hideLoading();
                },
                onLoad: function(t) {
                    var i, r = this;
                    return i = a.default.mark(function e() {
                        var n;
                        return a.default.wrap(function(e) {
                            for (;;) switch (e.prev = e.next) {
                              case 0:
                                return e.next = 2, r.$onLaunched;

                              case 2:
                                (n = r).setting = o.getStorageSync("setting"), n.tabBar = o.getStorageSync("tabbar"), 
                                n.userinfo = o.getStorageSync("userinfo"), o.hideLoading(), r.module_name = s.globalData.module_name, 
                                r.type = t.op, "wjs" != r.type && "yjs" != r.type && "today" != r.type && "month" != r.type && "lastmonth" != r.type || (r.tabs = [ "全部" ], 
                                r.orders = [ [] ], r.pages = [ 1 ], r.loadingTypes = [ 3 ]), r.getOrders();

                              case 13:
                              case "end":
                                return e.stop();
                            }
                        }, e);
                    }), function() {
                        var e = this, s = arguments;
                        return new Promise(function(n, t) {
                            var r = i.apply(e, s);
                            function o(e) {
                                u(r, n, t, o, a, "next", e);
                            }
                            function a(e) {
                                u(r, n, t, o, a, "throw", e);
                            }
                            o(void 0);
                        });
                    }();
                },
                watch: {
                    swiperCurrentIndex: function(e) {
                        this.orders[this.swiperCurrentIndex].length < 1 && 3 == this.loadingTypes[this.swiperCurrentIndex] && this.getOrders();
                    }
                },
                methods: {
                    navChange: function(e) {
                        this.swiperCurrentIndex = e;
                    },
                    swiperChange: function(e) {
                        e = e.detail.current;
                        this.swiperCurrentIndex = e;
                    },
                    scrollend: function(e) {
                        console.log(e), 3 == this.loadingTypes[this.swiperCurrentIndex] && this.getOrders();
                    },
                    getOrders: function() {
                        var n = this;
                        console.log("类型 : " + this.tabs[this.swiperCurrentIndex] + " 第" + this.pages[this.swiperCurrentIndex] + "页"), 
                        this.loadingTypes.splice(this.swiperCurrentIndex, 1, 1);
                        var e = s.globalData.util.url("entry/wxapp/orders2", {
                            m: s.globalData.module_name
                        }), t = {
                            openid: o.getStorageSync("openid"),
                            type: this.type,
                            status: this.tabs[this.swiperCurrentIndex],
                            page: this.pages[this.swiperCurrentIndex]
                        };
                        o.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: t,
                            success: function(e) {
                                e = s.globalData.crypt.Decrypt(e.data.data.data, e.data.data.key), e = JSON.parse(e);
                                "ok" == e.status || "nomore" == e.status ? (1 == n.pages[n.swiperCurrentIndex] ? n.orders.splice(n.swiperCurrentIndex, 1, e.orders) : n.orders[n.swiperCurrentIndex] = n.orders[n.swiperCurrentIndex].concat(e.orders), 
                                n.pages[n.swiperCurrentIndex]++, "nomore" == e.status ? n.loadingTypes.splice(n.swiperCurrentIndex, 1, 2) : n.loadingTypes.splice(n.swiperCurrentIndex, 1, 3)) : "empty" == e.status ? (console.log("empty"), 
                                n.loadingTypes.splice(n.swiperCurrentIndex, 1, 5)) : "nomore" == e.status && (console.log("nomore"), 
                                n.loadingTypes.splice(n.swiperCurrentIndex, 1, 2));
                            }
                        });
                    }
                },
                components: {
                    gracePage: function() {
                        r.e("graceUI/components/gracePage").then(function() {
                            return resolve(r("1021"));
                        }.bind(null, r)).catch(r.oe);
                    },
                    graceNavBar: function() {
                        r.e("graceUI/components/graceNavBar").then(function() {
                            return resolve(r("a631"));
                        }.bind(null, r)).catch(r.oe);
                    },
                    graceEmpty: function() {
                        r.e("graceUI/components/graceEmptyNew").then(function() {
                            return resolve(r("f8df"));
                        }.bind(null, r)).catch(r.oe);
                    },
                    graceLoading: function() {
                        r.e("graceUI/components/graceLoading").then(function() {
                            return resolve(r("1d04"));
                        }.bind(null, r)).catch(r.oe);
                    }
                }
            });
            t.default = n;
        }).call(this, r("543d").default);
    },
    "678d": function(e, n, t) {
        var r = t("de1d");
        t.n(r).a;
    },
    "8d30": function(e, n, t) {
        t.d(n, "b", function() {
            return r;
        }), t.d(n, "c", function() {
            return o;
        }), t.d(n, "a", function() {});
        var r = function() {
            this.$createElement;
            this._self._c;
        }, o = [];
    },
    "8f0b": function(e, n, t) {
        t.r(n);
        var r, o = t("518d"), a = t.n(o);
        for (r in o) "default" !== r && function(e) {
            t.d(n, e, function() {
                return o[e];
            });
        }(r);
        n.default = a.a;
    },
    acac: function(e, n, t) {
        (function(e) {
            function n(e) {
                return e && e.__esModule ? e : {
                    default: e
                };
            }
            t("0cda"), n(t("66fd")), e(n(t("f4950")).default);
        }).call(this, t("543d").createPage);
    },
    de1d: function(e, n, t) {},
    f4950: function(e, n, t) {
        t.r(n);
        var r, o = t("8d30"), a = t("8f0b");
        for (r in a) "default" !== r && function(e) {
            t.d(n, e, function() {
                return a[e];
            });
        }(r);
        t("678d");
        var s = t("f0c5"), o = Object(s.a)(a.default, o.b, o.c, !1, null, null, null, !1, o.a, void 0);
        n.default = o.exports;
    }
}, [ [ "acac", "common/runtime", "common/vendor" ] ] ]);